<%@ page pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/base/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link href="${ctx}/css/main.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${ctx}/js/swfobject.js"></script>
		<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
		<script language="javascript">
			function createReport() {
				var timeFrom = document.getElementById("timeFrom").value;
				if(timeFrom == '' || timeFrom == null) {
					alert("请输入起始时间");
					return false;
				}
				var timeTo = document.getElementById("timeTo").value;
				if(timeTo == '' || timeTo == null) {
					alert("请输入截至时间");
					return false;
				}
				var url = "${ctx}/createBaikeVisitReport.ac?timeFrom=" + timeFrom + "%26timeTo=" + timeTo;
				swfobject.embedSWF("${ctx}/swf/open-flash-chart.swf", "my_chart", "796", "300", "9.0.0"
				, "expressInstall.swf", {"data-file":url});
			}
		</script>
	</head>
	<body>
		<form method="post" action="" name="reportForm">
			<table border="0" cellspacing="1" cellpadding="3" align="center" width="100%">
				<tr>
					<td width="20%" class="td2">
						起始时间 <span style="color:red;vertical-align:middle;">*</span>
					</td>
					<td width="30%" class="td2">
						<input size="28" readonly="readonly" id="timeFrom" type="text" name="timeFrom" value="${timeFrom}"/>
						<img onclick="WdatePicker({el:'timeFrom'})" src="${ctx}/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
					</td>
					<td width="20%" class="td2"> 
						截至时间 <span style="color:red;vertical-align:middle;">*</span>
					</td>
					<td width="30%" class="td2">
						<input size="28" readonly="readonly" id="timeTo" type="text" name="timeTo" value="${timeTo}"/>
						<img onclick="WdatePicker({el:'timeTo'})" src="${ctx}/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
					</td>
				</tr>
				<tr>
					<td class="td11" align="left" colspan="4">
						<input type="button" name="search" value="生成报表" onClick="createReport();">
					</td>
				</tr>
			</table>
			<BR>
			<div id="my_chart"></div>
		</form>
	</body>
</html>